﻿CREATE TRIGGER LoanSocialResearchAttachments_Tracking_Delete
ON [dbo].[LoanSocialResearchAttachments] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.LoanSocialResearchAttachments_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.LoanSocialResearchAttachments_Tracking s JOIN DELETED i
    ON s.LoanSocialResearchAttachmentID = i.LoanSocialResearchAttachmentID
END














